From: Florian Müllner Date: Thu, 16 May 2013 15:51:31 +0000 (+0200) Subject: screenShield: Clear clipboard on lock X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~1013^2^2~4074 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=41ae93dba05995a491a229acba027c07a0680b95;p=gnome-shell.git screenShield: Clear clipboard on lock Currently the clipboard's contents may leak to unauthorized parties by pasting into the unlock dialog's password entry and unmasking the entry. Prevent this from happening by clearing the clipboard on lock. https://bugzilla.gnome.org/show_bug.cgi?id=698922 --- diff --git a/js/ui/screenShield.js b/js/ui/screenShield.js index 185f109c7..254bc68ad 100644 --- a/js/ui/screenShield.js +++ b/js/ui/screenShield.js @@ -1215,6 +1215,12 @@ const ScreenShield = new Lang.Class({ return; } + // Clear the clipboard - otherwise, its contents may be leaked + // to unauthorized parties by pasting into the unlock dialog's + // password entry and unmasking the entry + St.Clipboard.get_default().set_text(St.ClipboardType.CLIPBOARD, ''); + St.Clipboard.get_default().set_text(St.ClipboardType.PRIMARY, ''); + this._isLocked = true; this.activate(animate);